<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <title>ONE社区</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/OneCommunity.css">
    <script src="js/jquery-3.5.0.min.js"></script>
    <script src="js/bootbox.min.js" text="application/javascript"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="/js/One.js" text="application/javascript"></script>


</head>
<script type="application/javascript">
    window.onload = function () {
        const closable = window.localStorage.getItem("closable");
        if (closable === "true") {
            window.close();
            window.localStorage.removeItem("closable")
        }
    }
</script>

<body>
<!--导航菜单-->
<div th:insert="navigation::nav"></div>
<!--中间部分-->

<div class="container-fluid main">
    <div class="row" style="background-color: #ffffff">

        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">

            <h2><span class="glyphicon glyphicon-list" aria-hidden="true"></span> 发现</h2>
            <hr/>
            <!--            问题列表-->

            <div class="media" th:each="questionList:${Pagination.data}">
                <div class="media-left">
                    <a href="#">
                        <img class="media-object img-circle" th:src="${questionList.user.avatarUrl}" alt="图片">
                    </a>
                </div>
                <div class="media-body">
                    <h4 class="media-heading media-middle">
                        <!--/*@thymesVar id="id" type=""*/-->
                        <a th:href="@{'/question/'+${questionList.id}}" th:text="${questionList.title}"
                           style="text-decoration: none;"></a>
                    </h4>
                    <div th:text="${questionList.description}">
                    </div>
                    <!--                    <span th:text="${question.description}"></span>-->
                    <br>
                    <span class="text-descripte">
                        <!--/*@thymesVar id="commentCount" type=""*/-->
                        <span th:text="${questionList.commentCount}"></span>个回复  ·
                        <span th:text="${questionList.viewCount}"></span>次浏览  ·
                        <span th:text="${#dates.format(questionList.gmtCreate,' yyyy-MM-dd HH:mm')}"></span>
                    </span>
                </div>
                <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comment-sp">
            </div>

            <!--            分页-->
            <nav aria-label="Page navigation" th:if="${Pagination.totalPage>1}">
                <ul class="pagination">
                    <li>
                        <a th:if="${Pagination.showReturnFirstPage}" th:href="@{/(page =1,search=${search})}"
                           aria-label="Previous">
                            <span aria-hidden="true">&lt;&lt;</span>
                        </a>
                    </li>
                    <li>
                        <a th:if="${Pagination.showPrePage}"
                           th:href="@{/(page=${Pagination.currentPage-1},search=${search})}"
                           aria-label="Previous">
                            <span aria-hidden="true">&lt;</span>
                        </a>
                    </li>
                    <li th:each="page:${Pagination.showPages}" th:class="${Pagination.currentPage==page}?active:''">
                        <a th:href="@{/(page=${page},search=${search})}" th:text="${page}"></a>
                    </li>

                    <li>
                        <a th:if="${Pagination.showNextPage}"
                           th:href="@{/(page=${Pagination.currentPage+1},search=${search})}"
                           aria-label="Next">
                            <span aria-hidden="true">&gt;</span>
                        </a>
                    </li>
                    <li>
                        <a th:if="${Pagination.showReturnEndPage}"
                           th:href="@{/(page=${Pagination.totalPage},search=${search})}"
                           aria-label="Next">
                            <span aria-hidden="true">&gt;&gt;</span>
                        </a>
                    </li>
                </ul>
            </nav>
            <br>
            <hr>
        </div>


        <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
            <h3>官微助手</h3>
            <img src="/images/wechatLogo.jpg" alt="图片" style="width: 100px;height: 100px;">
            <h3>热门换题</h3>
            想你所想，做你所不敢做，所谓引领。
            <ul>
                <li th:each="list:${recommendList.data}">
                    <a th:href="@{'/question/'+${list.id}}" th:text="${list.title}" id="related"></a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!--底部备案号-->
<div th:insert="footer::footer"></div>
</body>
</html>